package com.liangzhong.modules.match.mediator
{
	import com.common.queueloader.QueueLoader;
	import com.common.queueloader.QueueLoaderEvent;
	import com.common.queueloader.QueueVo;
	import com.common.utils.Reflection;
	import com.global.GlobalDef;
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.constants.DomainConst;
	import com.liangzhong.constants.NotificationConstants;
	import com.liangzhong.constants.ResourceConst;
	import com.liangzhong.events.AppEventDispatcher;
	import com.liangzhong.events.MatchEvent;
	import com.liangzhong.events.ModuleEvent;
	import com.liangzhong.events.NotifierEvent;
	import com.liangzhong.facade.GameFacade;
	import com.liangzhong.manager.DomainManager;
	import com.liangzhong.manager.ResourceManager;
	import com.liangzhong.mediator.ModuleMediator;
	import com.liangzhong.model.AppData;
	import com.liangzhong.model.match.EventDes;
	import com.liangzhong.model.match.GameDes;
	import com.liangzhong.model.match.GameDes_Status;
	import com.liangzhong.model.match.GameStart;
	import com.liangzhong.model.match.MatchDataManager;
	import com.liangzhong.model.match.ShootBall_S;
	import com.liangzhong.model.match.vo.ChangePlayerPosVo;
	import com.liangzhong.model.match.vo.GameEndVo;
	import com.liangzhong.model.match.vo.PlayerSayVo;
	import com.liangzhong.model.match.vo.SelectTacticVo;
	import com.liangzhong.model.stadium.stadiumDataManager.FriendMatchInfoVo;
	import com.liangzhong.model.type.MatchType;
	import com.liangzhong.proxy.match.MatchProxy;
	import com.liangzhong.view.MatchLoadinglProgressBar;
	import com.lz.football.module.match.view.IMatchPanel;
	import com.lz.football.module.match.view.IMatchView;
	
	import common.matchAward.IMatchAwardView;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.system.ApplicationDomain;
	import flash.system.LoaderContext;
	import flash.utils.ByteArray;
	import flash.utils.clearTimeout;
	import flash.utils.getTimer;
	import flash.utils.setTimeout;
	
	import lz.controls.Alert;
	import lz.controls.managers.AnimationManager;
	import lz.controls.managers.PopUpManager;
	
	import org.puremvc.as3.interfaces.INotification;

	/**
	 *比赛
	 * @author lxh
	 *
	 */
	public class MatchMediator extends ModuleMediator
	{
		public static const MediatorName:String="MatchMediator";
		/**
		 * 游戏暂停 
		 */		
		public static const Game_Pause		:String = "MatchMediator/Game_Pause";
		/**
		 *游戏继续 
		 */		
		public static const Game_Continue	:String = "MatchMediator/Game_Continue";
		/**
		 *缓存命令，资源未加载完 
		 */		
		private var commandCaches :Array = [];
		/**
		 *比赛奖励 
		 */		
		private var awardVo :*;
		/**
		 *比赛窗口 
		 */		
		private var matchPanel :IMatchPanel;
		/**
		 *比赛id 
		 */		
		private var matchId	:int;
		/**
		 *比赛类型 
		 */		
		private var matchType	:int;
		/**
		 * 构造函数 
		 * @param mediatorName 名称
		 * @param viewComponent 视图
		 * @param param 参数
		 * 
		 */
		public function MatchMediator(mediatorName:String=null, 
									  viewComponent:Object=null,
									  param :Object = null)
		{
			super(mediatorName, viewComponent,param);
			matchId = param.matchId;
			matchType = param.type;
		}

		/**
		 *获取MatchView 实例
		 * @return
		 *
		 */
		public function get matchView():IMatchView
		{
			return viewComponent as IMatchView;
		}

		/**
		 *
		 * 添加事件
		 */
		override public function addEventListeners():void
		{
			if(matchView)
			{
				(matchView as EventDispatcher).addEventListener(MatchEvent.Player_Shoot_Ball, onShootBall);
				(matchView as EventDispatcher).addEventListener(MatchEvent.Select_Tactics,onSelectTactics);
				(matchView as EventDispatcher).addEventListener(ModuleEvent.REMOVE_MODULE, onRemoveModuleHandler);
				(matchView as EventDispatcher).addEventListener(MatchEvent.Slide,onSlideHandler);
				(matchView as EventDispatcher).addEventListener(MatchEvent.Adjust_Places,onAdjustPlace);
			}
		}
		/**
		 *删除处理
		 * @param e
		 *
		 */
		private function onRemoveModuleHandler(e:ModuleEvent):void
		{
			removeMediator();
			if(awardVo)
			{
				awardVo.matchtype = matchType;
				GameFacade.instance.sendNotification(NotificationConstants.MATCH_SHOW_AWARD,awardVo);
			}
			//发出比赛结束通知
			GameFacade.instance.sendNotification(NotificationConstants.MATCH_END,{type:matchType});
		}
		/**
		 *删除本mediator
		 *
		 */
		override public function removeMediator():void
		{
			super.removeMediator();
			facade.removeMediator(MediatorName + matchId);
		}
		/**
		 *
		 * 删除事件
		 */
		override public function removeEventListeners():void
		{
			if(matchView)
			{
				(matchView as EventDispatcher).removeEventListener(MatchEvent.Player_Shoot_Ball, onShootBall);
				(matchView as EventDispatcher).removeEventListener(MatchEvent.Select_Tactics,onSelectTactics);
				(matchView as EventDispatcher).removeEventListener(ModuleEvent.REMOVE_MODULE, onRemoveModuleHandler);
				(matchView as EventDispatcher).removeEventListener(MatchEvent.Slide,onSlideHandler);
				(matchView as EventDispatcher).removeEventListener(MatchEvent.Adjust_Places,onAdjustPlace);
			}
		}

		/**
		 *射门
		 * @param e
		 *
		 */
		private function onShootBall(e:MatchEvent):void
		{
			this.sendNotification(ApplicationConstants.Match_ShootBall,{matchId:matchId});
		}
		/**
		 *战术选择 
		 * @param e
		 * 
		 */		
		private function onSelectTactics(e :MatchEvent):void
		{
			var type :int = e.param;
			this.sendNotification(ApplicationConstants.Match_SelectTactics,{type:type,matchId:matchId});
		}
		/**
		 *调整位置 
		 * @param e
		 * 
		 */		
		private function onAdjustPlace(e :MatchEvent):void
		{
			var posArr :Array = e.param;
			this.sendNotification(ApplicationConstants.Match_AdjustPlace,{posArr:posArr,matchId:matchId});
		}
		/**
		 铲球 
		 * @param e
		 * 
		 */		
		private function onSlideHandler(e :MatchEvent):void
		{
			this.sendNotification(ApplicationConstants.Match_Slide,{matchId:matchId});
		}
		/**
		 *加载资源完毕
		 * @param e
		 *
		 */
		private function onLoadResComplete(e:MatchEvent=null):void
		{
			//AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Begin_Game));
			facade.sendNotification(ApplicationConstants.Match_LoadRes_Complete,{matchId:matchId}); //通知server 资源以及加载完毕
			if(AppData.getInstance().matchDataManager.isHistory)
			{
				facade.sendNotification(ApplicationConstants.Match_LoadRes_Complete_1); 
			}
			AppEventDispatcher.getInstance().dispatchEvt(NotifierEvent.MODULE_LOAD_RES_COMPLETE);
		}

		/**
		 * 监听消息列表
		 * @return
		 *
		 */
		override public function listNotificationInterests():Array
		{
			return [MatchProxy.GameStart_Result+matchId,
				MatchProxy.GameDes_Event_Result+matchId, 
				MatchProxy.GameDes_Result+matchId, 
				MatchProxy.GameDes_Status_Result+matchId, 
				MatchProxy.ShootBall_Result+matchId, 
				MatchProxy.GameEnd_Result+matchId,
				MatchProxy.SelectTactics_Result+matchId,
				MatchProxy.AdjustPlace_Result+matchId,
				Game_Continue,
				Game_Pause,
				MatchProxy.PlayerSaying_Result+matchId,
				NotificationConstants.MATCH_SELECT_AWARD + matchId,
				MatchProxy.Main_Guard_Result + matchId];
		}

		/**
		 * 捕获信息
		 * @param notification
		 *
		 */
		override public function handleNotification(notification:INotification):void
		{
			if(matchView == null)
			{
				commandCaches.push(notification);
				return;
			}
			switch (notification.getName())
			{
				case MatchProxy.GameStart_Result+matchId: //游戏开始
				{
					matchView.gameStart(notification.getBody() as GameStart);
					break;
				}
				case MatchProxy.GameDes_Event_Result+matchId: //比赛事件 
				{
					matchView.gameEvent(notification.getBody() as EventDes);
					break;
				}
				case MatchProxy.GameDes_Status_Result+matchId: //游戏状态
				{
					matchView.gameDesStatus(notification.getBody() as GameDes_Status);
					break;
				}
				case MatchProxy.GameDes_Result+matchId: //游戏描述
				{
					matchView.gameDes(notification.getBody() as GameDes);
					break;
				}
				case MatchProxy.ShootBall_Result+matchId: //射门
				{
					matchView.shootBall(notification.getBody() as ShootBall_S);
					break;
				}
				case MatchProxy.GameEnd_Result+matchId: //比赛结束
				{
					matchView.gameEnd(notification.getBody() as GameEndVo);
					break;
				}
				case Game_Pause://暂停
				{
					matchView.gamePause();
					break;
				}
				case Game_Continue://继续
				{
					matchView.gameContinue();
					break;
				}
				case MatchProxy.SelectTactics_Result+matchId://选择战术结果
				{
					matchView.selectTactics(notification.getBody() as SelectTacticVo);
					break;
				}
				case MatchProxy.AdjustPlace_Result+matchId://调整位置结果
				{
					matchView.adjustPlace(notification.getBody() as ChangePlayerPosVo);
					break;
				}
				case MatchProxy.PlayerSaying_Result+matchId://球员说话
				{
					matchView.playerSaying(notification.getBody() as PlayerSayVo);
					break;
				}
				case NotificationConstants.MATCH_SELECT_AWARD + matchId://赛后抽奖
				{
					awardVo = notification.getBody();
					break;
				}
				case MatchProxy.Main_Guard_Result + matchId://主要防守者
				{
					matchView.playerGuard(notification.getBody());
					break;
				}
			}
		}
		/**
		 * 注册
		 *
		 */
		private var startLoadTime:Number=0;
		//player cloth
		private var homeI:int;
		private var awayI:int;
		//守门员球衣
		private var homeK :int;
		private var awayK :int;
		//球场id
		private var stadiumId :int;
		
		override public function onRegister():void
		{
			if(MatchLoadinglProgressBar.instance.symbolSkin == null)
			{
				MatchLoadinglProgressBar.instance.initUI();
			}
			var optMatchInfo :FriendMatchInfoVo = AppData.getInstance().stadiumDataManager.opponentMatchInfo[matchId];
			
			matchPanel = Reflection.createInstance("common.match.MatchPanel");
			matchPanel.initUI();
			matchPanel.data = {name:optMatchInfo.name,type:matchType}
			GlobalDef.AlertContainer.addChild(matchPanel as DisplayObject);
			(matchPanel as DisplayObject).x = (GlobalDef.GameStage.stageWidth - (matchPanel as DisplayObject).width)/2;
			if (MatchLoadinglProgressBar.instance.parent == null)
			{
				(matchPanel as DisplayObjectContainer).addChild(MatchLoadinglProgressBar.instance);
				MatchLoadinglProgressBar.instance.y = 38;
				MatchLoadinglProgressBar.instance.x = 4;
			}
			
			var randomIndex:int;
			var tArr:Array=[];
			var ti:int=1;
			homeI = AppData.getInstance().clubDatamanager.clubInfo.homekot;
			awayI = AppData.getInstance().stadiumDataManager.opponentMatchInfo[matchId].trikot;
			//stadiumId
			stadiumId = AppData.getInstance().clubDatamanager.clubInfo.stadiumId;
			if(stadiumId <= 0 || stadiumId > 13)
			{
				trace("Error stadiumId = ",stadiumId);
				stadiumId = 1;
			}
			if(homeI <= 0 || homeI > 93)
			{
				trace("Error homeI = ",homeI);
				homeI = 1;
			}
			if(awayI <= 0 || awayI > 93)
			{
				trace("Error awayI = ",awayI);
				awayI = 2;
			}
			//keeper cloth
			ti = 1;
			tArr = [];
			while (ti <= 8)
			{
				tArr.push(ti);
				ti++;
			}
			randomIndex = Math.round(Math.random() * (tArr.length - 1));
			homeK = 3;//tArr[randomIndex];
			tArr.splice(randomIndex, 1)
			randomIndex = Math.round(Math.random() * (tArr.length - 1));
			awayK = 8;//tArr[randomIndex];
			//loading
			loader=new QueueLoader();
			var matchConfig:XML=XML(ResourceManager.instance.getResource(ResourceConst.MODULE_RES_CONFIG)).match[0];
			var releaseVersion:String;
			var applicationDomain:ApplicationDomain=new ApplicationDomain(ApplicationDomain.currentDomain);
			DomainManager.getInstance().setDomain(DomainConst.MATCH + matchId, applicationDomain);
			var tempDomain :ApplicationDomain = applicationDomain;
			var resUrl:String;
			var resNameT :String;
			resCount = 0;
			for each (var item:XML in matchConfig.item)
			{
				releaseVersion="?" + GlobalDef.ReleaseVersion + "." + item.@itemType;
				resUrl=item.@url;
				if (item.@resName == "role_home_png")
				{
					resUrl="res/swf/player/" + homeI + "_player.swf"
				}
				else if (item.@resName == "role_away_png")
				{
					resUrl="res/swf/player/" + awayI + "_player.swf"
				}
				if(item.@resName == "keeper_home_png")
				{
					resUrl="res/swf/player/" + homeK + "_keeper.swf"
				}
				else if(item.@resName == "keeper_away_png")
				{
					resUrl="res/swf/player/" + awayK + "_keeper.swf"
				}
				else if(item.@resName == "Scene")
				{
					resUrl="res/swf/map/" + stadiumId + ".swf"
				}
				else if(item.@resName == "referee_png")
				{
					resUrl="res/swf/player/1_referee.swf"
				}
				resNameT = item.@resName;
				if(resNameT == "Scene" 
					|| resNameT == "UI" 
					|| resNameT == "Door" 
					|| resNameT == "ball" 
					|| resNameT == "Match_start_end"
					|| resNameT == "Match_Effect" 
					|| resNameT == "role_home_png" 
					|| resNameT == "role_away_png"
					|| resNameT == "referee_png" 
					|| resNameT == "keeper_home_png" 
					|| resNameT == "keeper_away_png")
				{
					tempDomain = ApplicationDomain.currentDomain;
				}
				else
				{
					tempDomain = applicationDomain;
				}
				var keyS :String= resUrl.split("res/s")[1];
				if(ResourceManager.instance.isContainResource(keyS))
				{
					continue;
				}
				resCount ++;
				//trace("resUrl:",resUrl);
				loader.addQueue(new QueueVo(item.@resName, item.@id, item.@id, tempDomain), resUrl + releaseVersion);
			}
			startLoadTime=getTimer();
			AppData.getInstance().matchDataManager.putIsGameStart(String(matchId),false);
			loadRes();
			MatchLoadinglProgressBar.instance.startLoading();
			//发出比赛开始通知
			this.sendNotification(NotificationConstants.MATCH_START,{type:matchType});
			//lake guide use @2013-11-14
			AppEventDispatcher.getInstance().dispatchEvt(NotifierEvent.MODULE_LOAD_RES_COMPLETE + "_start",matchPanel);
		}
		/**
		 *单个加载进度
		 * @param e
		 *
		 */
		override protected function onLoadItemProgress(e:QueueLoaderEvent):void
		{
			var info:String=int(e.bytesLoaded / e.bytesTotal * 100) + "%  (" + curLoaderIndex + "/" + resCount + ")";
			MatchLoadinglProgressBar.instance.setPercent(info);
		}
		/**
		 *单个资源加载完毕
		 * @param e
		 */
		private var Assets:Class;

		override protected function onLoadItemComplete(e:QueueLoaderEvent):void
		{
			super.onLoadItemComplete(e);
			switch (e.queueVo.queueId)
			{
				case "match_01":
				{
					Assets=Reflection.getClass("Assets", DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId));
					Assets.currentDomain=DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId);
					//ta(e.content,DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId));
					break;
				}
				case "role_home_png":
				{
					break;
				}
				case "role_away_png":
				{
					break;
				}
				case "keeper_home_png":
				{
					break;
				}
				case "keeper_away_png":
				{
					break;
				}
				case "referee_png":
				{
					break;
				}
				case "role_home_config":
				{

					break;
				}
				case "role_away_config":
				{
					break;
				}
				case "keeper_home_config":
				{
					break;
				}
				case "keeper_away_config":
				{
					break;
				}
				case "referee_config":
				{
					break;
				}
			}
			var resNameT :String = e.queueVo.queueName;
			if(resNameT == "Scene" 
				|| resNameT == "UI" 
				|| resNameT == "Door" 
				|| resNameT == "ball" 
				|| resNameT == "Match_start_end"
				|| resNameT == "Match_Effect"
				|| resNameT == "role_home_config"
				|| resNameT == "role_away_config"
				|| resNameT == "keeper_home_config"
				|| resNameT == "keeper_away_config"
				|| resNameT == "referee_config"
				|| resNameT == "role_home_png" 
				|| resNameT == "role_away_png"
				|| resNameT == "referee_png" 
				|| resNameT == "keeper_home_png" 
				|| resNameT == "keeper_away_png")
			{
				var keyS :String = e.path.url.split("?")[0];
				keyS = keyS.split("res/s")[1];
				if(ResourceManager.instance.isContainResource(keyS) == false)
				{
					ResourceManager.instance.putResource(keyS,e.content);
				}
			}
		}
		/**
		 *test 
		 * @param datas
		 */		
		private function ta(datas :ByteArray,applicationDomain :ApplicationDomain = null):void
		{
			var len :int = datas.length;
			datas.position = 0;
			var i :int = 0;
			var randomCount :int;
			var tempByteArr :ByteArray = new ByteArray();
			while(i < len)
			{
				randomCount = datas.readByte();
				tempByteArr.writeByte(~randomCount);
				i ++;
			}
			tempByteArr.position = 0;
			var lct :LoaderContext = new LoaderContext();
			lct.allowCodeImport = true;
			lct.applicationDomain = applicationDomain;
			var loader :Loader = new Loader();
			loader.loadBytes(tempByteArr,lct); 
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE,function():void{
				Assets=Reflection.getClass("Assets", DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId));
				Assets.currentDomain=DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId);
			});
		}
		/**
		 *加载资源完毕
		 * @param e
		 */
		override protected function onLoadComplete(e:QueueLoaderEvent):void
		{
			//自己队服
			//Assets.sTextureBitmapDatas[Assets.ROLE_HOME]=Reflection.createInstance("com.match.player."+ homeI +"_player");
			if(MatchDataManager.sTextureBitmapDatas[Assets.ROLE_HOME] == null)
			{
				MatchDataManager.sTextureBitmapDatas[Assets.ROLE_HOME] = Reflection.createInstance("com.match.player."+ homeI +"_player");
			}
			//对手队服
			Assets.sTextureBitmapDatas[Assets.ROLE_AWAY]=Reflection.createInstance("com.match.player."+ awayI +"_player");
			//裁判队服
			//Assets.sTextureBitmapDatas[Assets.REFEREE]=Reflection.createInstance("com.match.referee.1_referee");
			if(MatchDataManager.sTextureBitmapDatas[Assets.REFEREE] == null)
			{
				MatchDataManager.sTextureBitmapDatas[Assets.REFEREE] = Reflection.createInstance("com.match.referee.1_referee");
			}
			//自己守门员队服
			//Assets.sTextureBitmapDatas[Assets.KEEPER_HOME]=Reflection.createInstance("com.match.keeper."+ homeK +"_keeper");
			if(MatchDataManager.sTextureBitmapDatas[Assets.KEEPER_HOME] == null)
			{
				MatchDataManager.sTextureBitmapDatas[Assets.KEEPER_HOME] = Reflection.createInstance("com.match.keeper."+ homeK +"_keeper");
			}
			//对手守门员队服
			//Assets.sTextureBitmapDatas[Assets.KEEPER_AWAY]=Reflection.createInstance("com.match.keeper."+ awayK +"_keeper");
			if(MatchDataManager.sTextureBitmapDatas[Assets.KEEPER_AWAY] == null)
			{
				MatchDataManager.sTextureBitmapDatas[Assets.KEEPER_AWAY] = Reflection.createInstance("com.match.keeper."+ awayK +"_keeper");
			}
			//背景图片
			if(MatchDataManager.matchBgBitmap == null)
			{
				//绘制背景 加上球门
				var bgMapSp :Sprite = Reflection.createInstance("com.lz.football.Map_220");
				var upDoor :flash.display.MovieClip = Reflection.createInstance("com.lz.football.UpDoor");
				var downDoor :flash.display.MovieClip = Reflection.createInstance("com.lz.football.DownDoor");
				bgMapSp.addChild(upDoor);
				upDoor.x = 680;
				upDoor.y = 81;
				bgMapSp.addChild(downDoor);
				downDoor.x = 680;
				downDoor.y = 2196 + 90;
				var bgBitmapData :BitmapData = new BitmapData(1580,2360);
				bgBitmapData.draw(bgMapSp);
				MatchDataManager.matchBgBitmap = new Bitmap(bgBitmapData);
			}
			MatchDataManager.sTexturesConfig[Assets.ROLE_HOME]=XML(ResourceManager.instance.getResource("wf/player/1_player_textureAtlasConfig.xml"));
			MatchDataManager.sTexturesConfig[Assets.ROLE_AWAY]=XML(ResourceManager.instance.getResource("wf/player/1_player_textureAtlasConfig.xml"));
			MatchDataManager.sTexturesConfig[Assets.KEEPER_HOME]=XML(ResourceManager.instance.getResource("wf/player/1_keeper_textureAtlasConfig.xml"));
			MatchDataManager.sTexturesConfig[Assets.KEEPER_AWAY]=XML(ResourceManager.instance.getResource("wf/player/1_keeper_textureAtlasConfig.xml"));
			MatchDataManager.sTexturesConfig[Assets.REFEREE]=XML(ResourceManager.instance.getResource("wf/player/1_referee_textureAtlasConfig.xml"));
			
			initMatch();
		}
		private function initMatch():void
		{
			if (MatchLoadinglProgressBar.instance && MatchLoadinglProgressBar.instance.parent)
			{
				MatchLoadinglProgressBar.instance.stopLoading();
				MatchLoadinglProgressBar.instance.parent.removeChild(MatchLoadinglProgressBar.instance);
			}
			onLoadResComplete(); //通知server 加载完毕
			//
			var applicationDomain:ApplicationDomain=DomainManager.getInstance().getDomain(DomainConst.MATCH + matchId);
			var match:IMatchView= Reflection.createInstance("MatchView",applicationDomain);//resList[0].content;
			viewComponent=match;
			matchPanel.view = match;
			match.initUI({disp:matchPanel,id:matchId});
			//
			addEventListeners();
			//执行缓存
			for each(var comItem :* in commandCaches)
			{
				handleNotification(comItem);
			}
			commandCaches.splice(0);
		}
		/**
		 *on remove
		 *
		 */
		override public function onRemove():void
		{
			AppData.getInstance().matchDataManager.removeIsGameStart(String(matchId));
			super.onRemove();
			removeEventListeners();
			matchView.destroyView();
			if(matchView && (matchView as DisplayObject).parent)
			{
				(matchView as DisplayObject).parent.removeChild((matchView as DisplayObject));
			}
			Assets=null;
			viewComponent=null;
			DomainManager.getInstance().removeDomain(DomainConst.MATCH + matchId);
			if(matchPanel)
			{
				matchPanel.destroyView();
				matchPanel = null;
			}
			delete AppData.getInstance().stadiumDataManager.opponentMatchInfo[matchId];
			delete AppData.getInstance().stadiumDataManager.selfMatchInfo[matchId];
			//player upgrade
//			if(AppData.getInstance().clubDatamanager.clubInfoVo.upgradePlayers.length > 0)
//			{
//				this.sendNotification(NotificationConstants.PLAYER_UPGRADE);
//			}
		}
	}
}
